home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / HCAL-27 / CCDANTEN.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1997-01-27  |  8.0 KB  |  258 lines

  1. 10  'CCDANTEN - CCD Antenna - 01 MAR 94 rev. 27 SEP 96
  2. 20  IF EX$=""THEN EX$="EXIT"
  3. 30  CLS:KEY OFF
  4. 40  COLOR 7,0,1
  5. 50  UL$=STRING$(80,205)
  6. 60  U1$="######.###"
  7. 70  Q$="'"
  8. 80  '
  9. 90  DIAM(1)=0.032    'wire diameters
  10. 100  DIAM(2)=0.0403
  11. 110  DIAM(3)=0.0508
  12. 120  DIAM(4)=0.0641
  13. 130  DIAM(5)=0.0808
  14. 140  '
  15. 150  DIM C(73)      'capacitor standard values
  16. 160  DATA 1,2,3,5,7,10,12,15,18,20,22,24,27,30,33,36,39,43,47,50,51,56,62,68
  17. 170  DATA 75,82,91,100,110,120,150,160,180,200,220,240,250,270,330,360,390
  18. 180  DATA 430,470,500,510,560,620,680,750,820,910,1000,1100,1200,1500,1600,1800
  19. 190  DATA 2000,2200,2400,2700,3000,3300,3900,4300,4700,5000,5100,5600,6200
  20. 200  DATA 6800,7500,8200
  21. 210  FOR Z=0 TO 72:READ C(Z):NEXT Z   'load capacitor values
  22. 220  '
  23. 230  '.....start
  24. 240  CLS
  25. 250  COLOR 15,2
  26. 260  PRINT " CONTROLLED CURRENT DISTRIBUTION (CCD) ANTENNAS";
  27. 270  PRINT TAB(57);"by George Murphy VE3ERP ";
  28. 280  COLOR 1,0:PRINT STRING$(80,223);
  29. 290  COLOR 7,0
  30. 300  GOSUB 1940   'text block
  31. 310  COLOR O,7:LOCATE CSRLIN+1,22
  32. 320  PRINT " Press 1 to continue or 0 to EXIT....."
  33. 330  COLOR 7,0
  34. 340  Z$=INKEY$:IF Z$=""THEN 340
  35. 350  IF Z$="0"THEN CLS:RUN EX$
  36. 360  IF Z$="1"THEN 380
  37. 370  GOTO 340
  38. 380  LOCATE CSRLIN-1:PRINT STRING$(80,32);
  39. 390  GOSUB 2450   'dump screen option
  40. 400  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  41. 410  GOSUB 2360   'disclaimer
  42. 420  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  43. 430  '
  44. 440  '.....diagram
  45. 450  LOCATE 3
  46. 460  PRINT " Adapted from a program and article by Stanley Kaplan WB9RQR and ";
  47. 470  PRINT "E.Joseph Bauer"
  48. 480  PRINT " W9WQ in the ARRL Antenna Compendium, Volume 2, page 132. Refer to ";
  49. 490  PRINT "this article"
  50. 500  PRINT " for a complete description of this type of antenna."
  51. 510  PRINT UL$;
  52. 520  COLOR 0,7
  53. 530  PRINT"    w   w   w   w     w   w   w   w                  w   w   w   w   "
  54. 540  PRINT"  /SOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDBSAVE/BSAVESOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUND/    CALL      SOUNDSOUND/BSAVESOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUNDUSINGSOUNDSOUNDSOUND/ "
  55. 550  PRINT"      c   c   c   INSTRTHENINSTR   c   c   c        CALLw      INSTRTHENINSTR   c   c   c     "
  56. 560  PRINT"                  INSTRTHENINSTR                   THENINSTRTHEN c    INSTRTHENINSTR                 "
  57. 570  PRINT"    Feedline:     INSTRTHENINSTR         Feedline:  CALLw      INSTRTHENINSTR Feedline:       "
  58. 580  PRINT"    Open-wire or  INSTRTHENINSTR         52- coax  THENINSTRTHEN c    INSTRTHENINSTR Open-wire with  "
  59. 590  PRINT"    52- coax with INSTRTHENINSTR         or single  CALLw      INSTRTHENINSTR one wire not    "
  60. 600  PRINT"    balun         INSTRTHENINSTR         wire SOUNDCOLOR   THENINSTRTHEN c    INSTRTHENINSTR terminated, or  "
  61. 610  PRINT"                 VARPTRMOTORSOUNDMOTORCOLOR        VARPTRSOUNDSOUNDSOUNDCOLOR DEFINT    CALLw     VARPTRMOTORSOUNDMOTORCOLORsingle wire     "
  62. 620  PRINT"                 CALL T CALL        CALL T PSETTHENTHENTHENTHENTHENFNLOAD      CALL T CALL                "
  63. 630  PRINT"                 CLSSOUNDSOUNDSOUND'        CLSSOUNDSOUNDSOUND'     CALL       CLSSOUNDSOUNDSOUND'                "
  64. 640  PRINT"                DIPOLE       VERTICAL  ///grnd     LONG-WIRE/ZEPP    "
  65. 650  COLOR 7,0
  66. 660  PRINT UL$;
  67. 670  PRINT" w = Identical wire sections";
  68. 680  PRINT TAB(32);"NOTES:Use 5% dipped Silver-Mica capacitors."
  69. 690  PRINT" c = Identical capacitors";
  70. 700  PRINT TAB(38);"The more capacitors, the better !";
  71. 710  PRINT" T = Transmatch";
  72. 720  PRINT TAB(38);"Design antenna for the low end of the band.";
  73. 730  PRINT UL$;
  74. 740  GOSUB 2450
  75. 750  '
  76. 760  '.....start program
  77. 770  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  78. 780  '
  79. 790  '.....data input
  80. 800  PRINT " Press number in < > to select type of antenna:
  81. 810  PRINT UL$;
  82. 820  PRINT "  < 1 >  Dipole"
  83. 830  PRINT "  < 2 >  Vertical or Long Wire"
  84. 840  PRINT UL$;
  85. 850  Z$=INKEY$
  86. 860  IF Z$="1"THEN TYPE=1:T$="DIPOLE":GOTO 900
  87. 870  IF Z$="2"THEN TYPE=2:T$="VERTICAL or LONG WIRE":GOTO 900
  88. 880  GOTO 850
  89. 890  '
  90. 900  PRINT " Press number in < > to choose how you want capacitor ";
  91. 910  PRINT "values displayed:
  92. 920  PRINT UL$;
  93. 930  PRINT "  < 1 >  Exact calculated values"
  94. 940  PRINT "  < 2 >  Nearest standard values"
  95. 950  PRINT UL$;
  96. 960  Z$=INKEY$
  97. 970  IF Z$="1"THEN NEAR=0:PF$="EXACT CALCULATED":GOTO 1010
  98. 980  IF Z$="2"THEN NEAR=1:PF$="NEAREST STANDARD":GOTO 1010
  99. 990  GOTO 960
  100. 1000  '
  101. 1010  INPUT " ENTER: Frequency, in MHz, of low end of band ";FREQ
  102. 1020  TOTLINCH=300/FREQ*39.37
  103. 1030  FEETINCH=TOTLINCH:GOSUB 1690
  104. 1040  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  105. 1050  '
  106. 1060  '.....calculate capacitance for each wire size
  107. 1070  FOR I=1 TO 5
  108. 1080   INDUCT(I)=0.00508*TOTLINCH*((LOG(4*TOTLINCH/DIAM(I))-0.75))
  109. 1090   CTOT(I)=2*((1/(((6.2832*FREQ)^2)*INDUCT(I))*10^6))
  110. 1100  NEXT I
  111. 1110  '
  112. 1120  '.....calculate and display table
  113. 1130  PRINT " CCD ";T$;" ANTENNA for";FREQ;"MHz. (wavelength=";
  114. 1140  PRINT USING "###.#";300/FREQ;:PRINT " m.)"
  115. 1150  PRINT " Overall length =";DIMEN$;"  (";USING "####.##";TOTLINCH/12;
  116. 1160  PRINT " ft.)(";USING "#####.##";TOTLINCH;
  117. 1170  PRINT CHR$(34);")(";USING "###.###";TOTLINCH*25.4/1000;:PRINT " m.)"
  118. 1180  PRINT UL$;
  119. 1190  PRINT"        VARPTRSOUNDSOUND Wire Size/Capacitor value SOUNDSOUNDCOLORDEFSNGSOUND ";PF$;
  120. 1200  PRINT" pF values shown."
  121. 1210  PRINT" No. No.CALL   #12   #14   #16   #18   #20 PSETTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHEN";
  122. 1220  PRINT "THENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHEN";
  123. 1230  PRINT" of  of CALL   AWG   AWG   AWG   AWG   AWG CALL   Centre-to-centre Distance
  124. 1240  PRINT" SEC CAPCALL    pF    pF    pF    pF    pF CALL   Between Capacitors
  125. 1250  PRINT UL$;
  126. 1260  LOCATE CSRLIN-1,9:PRINT "INSTR":LOCATE CSRLIN-1,41:PRINT "INSTR"
  127. 1270  LN=10
  128. 1280  S=-4
  129. 1290  FOR SECTION=50 TO 1 STEP S
  130. 1300   FOR I=1 TO 5
  131. 1310  IF TYPE=1 THEN NOCAP=SECTION-2
  132. 1320  IF TYPE=2 THEN NOCAP=SECTION-1
  133. 1330    IF TYPE=1 THEN CAP(I)=CTOT(I)*(SECTION-2)
  134. 1340    IF TYPE=2 THEN CAP(I)=CTOT(I)*(SECTION-1)
  135. 1350    C=CAP(I)
  136. 1360    IF NEAR THEN GOSUB 1610:CAP(I)=Y
  137. 1370   NEXT I
  138. 1380  N=TOTLINCH/SECTION
  139. 1390  PRINT USING "###";SECTION;
  140. 1400  PRINT USING "####";NOCAP;
  141. 1410  PRINT " CALL";
  142. 1420  FOR Z=5 TO 1 STEP -1
  143. 1430  IF CAP(Z)<10 AND NEAR=0 THEN X$="####.#"ELSE X$="######"
  144. 1440  IF NOCAP=0 THEN CAP(Z)=0
  145. 1450  PRINT USING X$;CAP(Z);
  146. 1460  NEXT Z
  147. 1470  PRINT " CALL";
  148. 1480  FEETINCH=N:GOSUB 1690
  149. 1490  X$=""
  150. 1500  IF FT<100 THEN X$=" "
  151. 1510  IF FT<10 THEN X$="  "
  152. 1520  PRINT X$;DIMEN$;TAB(59);"(";USING "####.##";N;
  153. 1530  PRINT CHR$(34);")(";USING"##.###";N*25.4/1000;:PRINT " m.)";
  154. 1540  LN=LN+1
  155. 1550  IF LN<24 THEN PRINT ""
  156. 1560  IF LN=24 THEN GOSUB 2450:CLS:LN=0
  157. 1570  NEXT SECTION
  158. 1580  GOSUB 2450
  159. 1590  GOTO 230
  160. 1600  '
  161. 1610  '.....nearest standard capacitor
  162. 1620  FOR Z=1 TO 73
  163. 1630  IF C(Z)>C THEN HI=C(Z):LO=C(Z-1):GOTO 1650
  164. 1640  NEXT Z
  165. 1650  IF (HI-C)<=(C-LO)THEN Y=HI
  166. 1660  IF (C-LO)<=(HI-C)THEN Y=LO
  167. 1670  RETURN
  168. 1680  '
  169. 1690  '.....convert to feet and inches
  170. 1700  FT=0                         'set feet to zero
  171. 1710  IF FEETINCH>12 THEN FT=INT(FEETINCH/12):FEETINCH=FEETINCH-FT*12
  172. 1720  IN=INT(FEETINCH)                 'whole inches
  173. 1730  FR=FEETINCH-IN                   'decimal part of inch
  174. 1740  '.....calculate fraction
  175. 1750  D=64                             'denominator base
  176. 1760  E=FR*D                           'enumerator
  177. 1770  IF E=0 THEN D=0:GOTO 1820
  178. 1780  E=CINT(E/2):D=D/2
  179. 1790  IF E=0 THEN D=0:GOTO 1820
  180. 1800  IF E/2=INT(E/2)THEN 1780
  181. 1810  '
  182. 1820  IF E=1 AND D=1 THEN IN=IN+1:E=0:D=O
  183. 1830  IF IN=12 THEN FT=FT+1:IN=0
  184. 1840  IN$=STR$(IN)
  185. 1850  FT$=STR$(FT)
  186. 1860  E$=STR$(E)
  187. 1870  D$=STR$(D):D$=RIGHT$(D$,LEN(D$)-1)
  188. 1880  DIMEN$=FT$+"'-"+IN$
  189. 1890  IF E=0 THEN 1910
  190. 1900  DIMEN$=DIMEN$+E$+"/"+D$
  191. 1910  DIMEN$=DIMEN$+CHR$(34)
  192. 1920  RETURN
  193. 1930  '
  194. 1940  '.....text block
  195. 1950  TB=7      'tab for text
  196. 1960  PRINT TAB(TB);
  197. 1970  PRINT "  The Controlled Current Distribution Antenna consists of identical"
  198. 1980  PRINT TAB(TB);
  199. 1990  PRINT "lengths of wire joined together by identical capacitors. It looks"
  200. 2000  PRINT TAB(TB);
  201. 2010  PRINT "not unlike a trap antenna except the 'traps' are capacitors and"
  202. 2020  PRINT TAB(TB);
  203. 2030  PRINT "there are liable to be a lot of them."
  204. 2040  PRINT TAB(TB);
  205. 2050  PRINT "  Resonance is achieved by the proper combination of the capacitors"
  206. 2060  PRINT TAB(TB);
  207. 2070  PRINT "and the inductance of the antenna wire itself."
  208. 2080  PRINT TAB(TB);
  209. 2090  PRINT "  There can be practically any number of capacitors inserted into"
  210. 2100  PRINT TAB(TB);
  211. 2110  PRINT "the antenna. (This program designs antennas with up to fifty"
  212. 2120  PRINT TAB(TB);
  213. 2130  PRINT "capacitors). As a general rule, the more capacitors the more"
  214. 2140  PRINT TAB(TB);
  215. 2150  PRINT "efficient the antenna."
  216. 2160  PRINT TAB(TB);
  217. 2170  PRINT "  The design procedure is simple. Run the program and select the"
  218. 2180  PRINT TAB(TB);
  219. 2190  PRINT "'Nearest Standard Value' menu option. Enter the frequency of the"
  220. 2200  PRINT TAB(TB);
  221. 2210  PRINT "band of operation and the program will display several optional"
  222. 2220  PRINT TAB(TB);
  223. 2230  PRINT "configurations for the antenna. Match up the value and quantity"
  224. 2240  PRINT TAB(TB);
  225. 2250  PRINT "of capacitors you have in your junk box (or can find at a flea"
  226. 2260  PRINT TAB(TB);
  227. 2270  PRINT "market) with one of the options and the design is finished !"
  228. 2280  PRINT TAB(TB);
  229. 2290  PRINT "  To fit the screen, options are shown in steps of 4 capacitors."
  230. 2300  PRINT TAB(TB);
  231. 2310  PRINT "For intermediate even numbered steps the capacitor values will be"
  232. 2320  PRINT TAB(TB);
  233. 2330  PRINT "halfway between the values for the adjacent steps.
  234. 2340  RETURN
  235. 2350  '
  236. 2360  '.....preface
  237. 2370  OPEN"I",1,"\data\docfiles\antenna.doc"
  238. 2380  IF EOF(1)THEN 2400
  239. 2390  INPUT#1,NOTE$:PRINT "   ";NOTE$:GOTO 2380
  240. 2400  PRINT :PRINT "   Press any key to continue....."
  241. 2410  IF INKEY$=""THEN 2410
  242. 2420  CLOSE
  243. 2430  RETURN
  244. 2440  '
  245. 2450  'HARDCOPY
  246. 2460  GOSUB 2570:LOCATE 25,2:COLOR 14,6
  247. 2470  PRINT " Press 1 to print screen, 2 to print screen & ";
  248. 2480  PRINT "advance paper, or 3 to continue.";:COLOR 7,0
  249. 2490  Z$=INKEY$:IF Z$="3"THEN GOSUB 2570:RETURN
  250. 2500  IF Z$="1"OR Z$="2"THEN GOSUB 2570:GOTO 2520
  251. 2510  GOTO 2490
  252. 2520  FOR QX=1 TO 24:FOR QY=1 TO 80
  253. 2530  LPRINT CHR$(SCREEN(QX,QY));
  254. 2540  NEXT QY:NEXT QX
  255. 2550  IF Z$="2"THEN LPRINT CHR$(12)
  256. 2560  GOTO 2460
  257. 2570  LOCATE 25,1:PRINT STRING$(80,32);:RETURN
  258.